import request from '@/utils/request'

// 获取文章分类列表
export const getCateListAPI = () => request.get('/my/cate/list')

// 新增文章分类
export const addCategoryAPI = data => request.post('/my/cate/add', data)

// 根据 id 删除文章分类
export const delByIdCategoryAPI = data => request.delete('/my/cate/del', { params: { id: data } })

// 根据 id 获取文章分类数据
export const getCategoryByIdAPI = id => request.get('/my/cate/info', { params: { id } })

// 根据 id 更新文章分类数据
export const updateCategoryByIdAPI = data => request.put('/my/cate/info', data)
